package org.sws.domain.credit.model.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.sws.domain.credit.event.CreditAdjustSuccessMessageEvent;
import org.sws.types.enums.TaskState;
import org.sws.types.event.BaseEvent;

/**
 * @Author sws
 * @Date 2025/4/2 18:00
 * @description: 积分MQ任务实体对象
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CreditTaskEntity {

    /** 用户ID */
    private String userId;
    /** 消息主题 */
    private String topic;
    /** 消息编号 */
    private String messageId;
    /** 消息主体 */
    private BaseEvent.EventMessage<CreditAdjustSuccessMessageEvent.CreditAdjustSuccessMessage> message;
    /** 任务状态；create-创建、completed-完成、fail-失败 */
    private TaskState state;
}
